package com.iocup.keybastion.common;


/**
 * @Description: 公用配置
 * @Author: xyjxust
 * @Date: 2021/11/26 9:56
 */
public interface AuthConstant {

    /**
     * 缓存命名空间
     */
    public static final String CACHE_NAMESPACE = "SECURITY:";
    /**
     * 缓存中存储异常的key
     */
    String CONTEXT_EXCEPTION_NAME = "context:exception:";

    /**
     * 默认客户端名字
     */
    String DEFAULT_CLIENT_NAME = "default_client";


    /**
     * 默认认证类型
     */
    String DEFAULT_AUTH_TYPE = "username_password";

    /**
     * 登录客户端的客户端key
     */
    String LOGIN_CLIENT_NAME = "CLIENT_NAME";
    /**
     * 登录类型
     */
    String AUTH_TYPE = "auth_type";
    /**
     * 设备类型
     */
    String DEVICE_NAME = "device";

    /**
     * 默认的设备类型
     */
    String DEFAULT_DEVICE_NAME = "PC";


    enum HTTP_METHOD {GET, POST, HEAD, TRACE, PUT, DELETE, OPTIONS, PATCH}

    String ACCESS_CONTROL_ALLOW_ORIGIN_HEADER = "Access-Control-Allow-Origin";

    String ACCESS_CONTROL_EXPOSE_HEADERS_HEADER = "Access-Control-Expose-Headers";

    String ACCESS_CONTROL_MAX_AGE_HEADER = "Access-Control-Max-Age";

    String ACCESS_CONTROL_ALLOW_CREDENTIALS_HEADER = "Access-Control-Allow-Credentials";

    String ACCESS_CONTROL_ALLOW_METHODS_HEADER = "Access-Control-Allow-Methods";

    String ACCESS_CONTROL_ALLOW_HEADERS_HEADER = "Access-Control-Allow-Headers";

    String SESSION_2_REQUEST_KEY = "session_2_request_key";
}
